package com.liuyc.lib.common.service

import android.app.Service
import com.liuyc.lib.common.service.business.BaseServiceBusiness
import java.lang.reflect.ParameterizedType

/**
 * BaseService
 * 基础服务 6.0 以后的系统 屏幕熄屏之后无法进行网络请求
 * 刘隽
 */
abstract class BaseService<B : BaseServiceBusiness> : Service() {

    protected val mBusiness: B by lazy {
        val clazz = (javaClass.genericSuperclass as ParameterizedType?)!!.actualTypeArguments[0] as Class<B>
        clazz.newInstance()
    }


}